import java.util.ArrayList;

class FeuDeSignalisation
{
	private ArrayList<Usager> al;
	
	public FeuDeSignalisation()
	{
		al = new ArrayList<Usager>();
	}
	
	public String toString()
	{
		String res = "";
		for (Usager u: al)
			res += u + "\n";
		return res;
	}
	
	public void add(Usager u)
	{
		if (!u.peutDepasser())
			al.add(u);
		else
		{
			int pos = al.size()-1;
			while (pos >= 0)
			{
				if (!al.get(pos).peutDepasser())
					pos--;
				else
					break;
			}
			al.add(pos+1, u);
		}
	}
}
